From 96ea34f1c42b7a21428250605fdef9756270e51e Mon Sep 17 00:00:00 2001 From: tsteven4 Date: Fri, 19 Jul 2013 02:33:57 +0000 Subject: [PATCH] improve cross platform test matching by rounding instead of truncating latitude/longitude. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@4456 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/bushnell.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gpsbabel/bushnell.cc b/gpsbabel/bushnell.cc index d97bb7f81..a1bed6d7c 100644 --- a/gpsbabel/bushnell.cc +++ b/gpsbabel/bushnell.cc @@ -21,6 +21,7 @@ #include "defs.h" +#include #define MYNAME "Bushnell" static gbfile* file_in; @@ -235,8 +236,8 @@ bushnell_write_one(const waypoint* wpt) xasprintf(&fname, "%s-%d.wpt", ofname, wpt_count++); file_out = gbfopen_le(fname, "wb", MYNAME); - gbfputint32(wpt->latitude * 10000000, file_out); - gbfputint32(wpt->longitude * 10000000, file_out); + gbfputint32(round(wpt->latitude * 10000000), file_out); + gbfputint32(round(wpt->longitude * 10000000), file_out); gbfputc(bushnell_get_icon_from_name(wpt->icon_descr), file_out); gbfputc(0x01, file_out); // Proximity alarm. 1 == "off", 3 == armed. -- 2.30.2